var info = {}
info.exit=function (){
    var result = confirm('是否确认退出')
    if (result==true){
        location.href='common/exit'
    }
}
info.updatePwd=function (){
    $.post('common/updatePwd',null,function (view){
        $('#modal-body').html(view)
        $('#myModal').modal('show');
    })

}
info.commitUpdatePwd=function (){
    var passwords = {}
    passwords.oldPwd=$('#oldPwd').val();
    passwords.newPwd=$('#newPwd').val();
    passwords.surePwd=$('#surePwd').val();
    if (passwords.newPwd!=passwords.surePwd){
        alert('两次密码不对应')
        return false;
    }
    $.post('common/commitUpdatePwd',passwords,function (result){
        if (result==1){
            alert('原密码不正确')
        }
        if (result==0){
            alert('修改成功，点击确认，返回登录')
            location.href="login"
        }
    })

}